#define NOT_FOUND -1
int find(int A[],int n,int key)
{
    int ans=NOT_FOUND;
    int i;
    for(i=0;i<n;i++)
        if(key==A[i])
        {
            ans=i;
            break;
        }
    return ans;
}

int main()
{
    int A[]={1,2,3,5,3,6,8,9,0,0,9};
    int n=sizeof(A)/sizeof(A[0]);
    int k=9;
    int pos=find(A+n/2,n/2,k);
    printf("%d\n",pos);
    return 0;

}
